<?php

require_once 'portal.php';

output(set_params($input));

function set_params($input) {
  $value = stringify($input->value);
  $name = $input->name;
  $sql = "UPDATE `pims_config_params` SET `value`= '{$value}' WHERE `name` = '{$name}'";
  $res = exec_sql($sql);
  return array('status' => 'success', 'result' => $res);
}
